answer"Edit 1.Question or 2.Conclusion" with "Ques" or "Con" or "Cancel"
put it into rem
if rem is "Cancel" then exit mouseUp
if rem is "Ques" then
ask "Enter the question number to delete"
if it is empty then exit mouseUp
put it into pain
set lockscreen to true
put "WORKING.." into msg
go to card "ques"&pain
put the id of this card into nm
domenu "delete card"
go to card temp
end if
if rem is "Con" then
ask "Enter the conclusion number to delete"
if it is empty then exit mouseUp
hide msg
set lockscreen to true
put it into pain
if a = pain and a1 = "Conclusion" then
add 10000 to pain
go to card "con"&pain
subtract 10000 from pain
put the id of this card into nm
domenu "delete card"
go to card temp
else
put it into pain
go to card "con"&pain
put the id of this card into nm
domenu "delete card"
go to card temp
end if
end if
put the short name of this card into cdname
if a = pain and a1 = "Question" and rem = "Ques" then
if cdname Γëá "full" then
put card fld "ques2" into vir
put card fld "ques3" into vir2
if vir is empty and vir2 is empty then
put "butques"&pain into work
put "bac"&pain into wk
get loc of card button wk
get loc of card button wk
click at it
select card button work
domenu "clear button"
put the short name of this card into finn
domenu "back"
domenu "delete card"
go to card finn
subtract 1 from card fld "cd count"
subtract 1 from card fld "ans count"
show card fld "yes6fld"
find "ques"&pain in any card fld
put the foundField into jane
show jane
select text in jane
domenu "Clear Text"
choose browse tool
hide jane
if cd fld dqcount = 0 then
put pain&"," into card fld dqcount
else
put ","&pain after last item in card fld dqcount
end if
end if
else
subtract 1 from card fld "ans count"
put 100 into a3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes1
put empty into card fld no1
put empty into card fld ques1
put empty into card fld label1
put card fld "ques2" into vir
put card fld "ques3" into vir2
if vir is empty and vir2 is empty then
go to card build
choose browse tool
put empty into a3
hide msg
exit mouseUp
end if
end if
end if
choose browse tool
if b = pain and b1 = "Question" and rem = "Ques" then
put 100 into b3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes3
put empty into card fld no3
put empty into card fld ques2
put empty into card fld label2
subtract 1 from card fld "ans count"
choose browse tool
if cd fld dqcount = 0 then
put pain&"," into card fld dqcount
else
put ","&pain after last item in card fld dqcount
end if
end if
if c = pain and c1 = "Question" and rem = "Ques" then
put 100 into c3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes2
put empty into card fld no2
put empty into card fld ques3
put empty into card fld label3
subtract 1 from card fld "ans count"
choose browse tool
if cd fld dqcount = 0 then
put pain&"," into card fld dqcount
else
put ","&pain after last item in card fld dqcount
end if
end if
if d = pain and d1 = "Question" and rem = "Ques" then
put 100 into d3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes4
put empty into card fld no4
put empty into card fld ques4
put empty into card fld label4
subtract 1 from card fld "ans count"
choose browse tool
if cd fld dqcount = 0 then
put pain&"," into card fld dqcount
else
put ","&pain after last item in card fld dqcount
end if
end if
if e = pain and e1 = "Question" and rem = "Ques" then
put 100 into e3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes5
put empty into card fld no5
put empty into card fld ques5
put empty into card fld label5
subtract 1 from card fld "ans count"
choose browse tool
if cd fld dqcount = 0 then
put pain&"," into card fld dqcount
else
put ","&pain after last item in card fld dqcount
end if
end if
if f = pain and f1 = "Question" and rem = "Ques" then
put 100 into f3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes6
put empty into card fld no6
put empty into card fld ques6
put empty into card fld label6
subtract 1 from card fld "ans count"
choose browse tool
if cd fld dqcount = 0 then
put pain&"," into card fld dqcount
else
put ","&pain after last item in card fld dqcount
end if
end if
if g = pain and g1 = "Question" and rem = "Ques" then
put 100 into g3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes7
put empty into card fld no7
put empty into card fld ques7
put empty into card fld label7
subtract 1 from card fld "ans count"
choose browse tool
if cd fld dqcount = 0 then
put pain&"," into card fld dqcount
else
put ","&pain after last item in card fld dqcount
end if
end if
if a = pain and a1 = "Conclusion" and rem = "Con" then
if cdname Γëá "full" then
add 10000 to pain
put "butcon"&pain into work
put "bac"&pain into wk
subtract 10000 from pain
get loc of card button wk
click at it
select card button work
domenu "clear button"
put the short name of this card into finn
domenu "back"
domenu "delete card"
go to card finn
subtract 1 from card fld "cd count"
subtract 1 from card fld "con count"
add 10000 to pain
find "con"&pain in any card fld
put the foundField into jane
show jane
select text in jane
domenu "Clear Text"
choose browse tool
hide jane
subtract 10000 from pain
choose browse tool
if cd fld dccount of cd full = 0 then
put pain&"," into card fld dccount
else
put ","&pain after last item in card fld dccount
end if
else
put 100 into a3
select card button button1
domenu "clear button"
show card fld answer1
select card fld answer1
domenu "clear field"
put empty into card fld yes1
put empty into card fld no1
put empty into card fld ques1
put empty into card fld label1
choose browse tool
end if
end if
if b = pain and b1 = "Conclusion" and rem = "Con" then
put 100 into b3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes3
put empty into card fld no3
put empty into card fld ques2
put empty into card fld label2
subtract 1 from card fld "con count"
choose browse tool
if cd fld dccount = 0 then
put pain&"," into card fld dccount
else
put ","&pain after last item in card fld dccount
end if
end if
if c = pain and c1 = "Conclusion" and rem = "Con" then
put 100 into c3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes2
put empty into card fld no2
put empty into card fld ques3
put empty into card fld label3
subtract 1 from card fld "con count"
choose browse tool
if cd fld dccount = 0 then
put pain&"," into card fld dccount
else
put ","&pain after last item in card fld dccount
end if
end if
if d = pain and d1 = "Conclusion" and rem = "Con" then
put 100 into d3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes4
put empty into card fld no4
put empty into card fld ques4
put empty into card fld label4
subtract 1 from card fld "con count"
choose browse tool
if cd fld dccount = 0 then
put pain&"," into card fld dccount
else
put ","&pain after last item in card fld dccount
end if
end if
if e = pain and e1 = "Conclusion" and rem = "Con" then
put 100 into e3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes5
put empty into card fld no5
put empty into card fld ques5
put empty into card fld label5
subtract 1 from card fld "con count"
choose browse tool
if cd fld dccount = 0 then
put pain&"," into card fld dccount
else
put ","&pain after last item in card fld dccount
end if
end if
if f = pain and f1 = "Conclusion" and rem = "Con" then
put 100 into f3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes6
put empty into card fld no6
put empty into card fld ques6
put empty into card fld label6
subtract 1 from card fld "con count"
choose browse tool
if cd fld dccount = 0 then
put pain&"," into card fld dccount
else
put ","&pain after last item in card fld dccount
end if
end if
if g = pain and g1 = "Conclusion" and rem = "Con" then
put 100 into g3
select card button nm
domenu "clear button"
show card fld nm
select card fld nm
domenu "clear field"
put empty into card fld yes7
put empty into card fld no7
put empty into card fld ques7
put empty into card fld label7
subtract 1 from card fld "con count"
choose browse tool
if cd fld dccount = 0 then
put pain&"," into card fld dccount
else
put ","&pain after last item in card fld dccount
end if
end if
if a3 = 100 then
put card fld label2 into anx
put card fld label3 into anyy
put card fld ques2 into x
put card fld ques3 into y
if x is empty and y is empty then
hide msg
exit mouseUp
else
add 1 to card fld "ans count"
if rem = "Con" then
put "Conclusion" into card fld label1
if the number of items in cd fld dccount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dccount
end if
else
put "Question" into card fld label1
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
end if
put x into tox
put y into toy
put a into qcc
put a into card fld ques1
put "begin" into fldloc
answer "There is a question after this question" with "OK"
answer "We must do a replacement question" with "OK"
replace
put rpl1 into card fld yes1
put "yes1" into spec1
put rpl1 into btn1
put rpl2 into card fld no1
put rpl2 into btn2
put "no1" into spec2
fill
end if
end if
if b3 = 100 then
put card fld label7 into anx
put card fld label6 into anyy
put card fld ques7 into x
put card fld ques6 into y
if x is empty and y is empty then
hide msg
exit mouseUp
else
add 1 to card fld "ans count"
if rem = "Con" then
put "Conclusion" into card fld label2
if the number of items in cd fld dccount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dccount
end if
else
put "Question" into card fld label2
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
end if
put x into tox
put y into toy
put b into qcc
put b into card fld ques2
put "yes1" into fldloc
answer "There is a question after this question" with "OK"
answer "We must do a replacement question" with "OK"
replace
put rpl1 into card fld yes3
put "yes3" into spec1
put rpl1 into btn1
put rpl2 into card fld no3
put rpl2 into btn2
put "no3" into spec2
fill
end if
end if
if c3 = 100 then
put card fld label5 into anx
put card fld label4 into anyy
put card fld ques5 into x
put card fld ques4 into y
if x is empty and y is empty then
hide msg
exit mouseUp
else
add 1 to card fld "ans count"
if rem = "Con" then
put "Conclusion" into card fld label3
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dccount
else
delete last item of card fld dccount
end if
else
put "Question" into card fld label3
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
end if
put x into tox
put y into toy
put c into qcc
put c into card fld ques3
put "no1" into fldloc
answer "There is a question after this question" with "OK"
answer "We must do a replacement question" with "OK"
replace
put rpl1 into card fld yes2
put "yes2" into spec1
put rpl1 into btn1
put rpl2 into card fld no2
put rpl2 into btn2
put "no2" into spec2
fill
end if
end if
if d3 = 100 then
put card fld yes4fld into x
put card fld no4fld into y
if x is empty and y is empty then
hide msg
exit mouseUp
else
add 1 to card fld "ans count"
if rem = "Con" then
put "Conclusion" into card fld label4
if the number of items in cd fld dccount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dccount
end if
else
put "Question" into card fld label4
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
end if
put x into tox
put y into toy
put d into qcc
put d into card fld ques4
put "no2" into fldloc
answer "There is a question after this question" with "OK"
answer "We must do a replacement question" with "OK"
replace
put rpl1 into card fld yes4
put "yes4" into spec1
put rpl1 into btn1
put rpl2 into card fld no4
put rpl2 into btn2
put "no4" into spec2
fill
end if
end if
if e3 = 100 then
put card fld yes5fld into x
put card fld no5fld into y
if x is empty and y is empty then
hide msg
exit mouseUp
else
add 1 to card fld "ans count"
if rem = "Con" then
put "Conclusion" into card fld label5
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dccount
else
delete last item of card fld dccount
end if
else
put "Question" into card fld label5
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
end if
put x into tox
put y into toy
put e into qcc
put e into card fld ques5
put "yes2" into fldloc
answer "There is a question after this question" with "OK"
answer "We must do a replacement question" with "OK"
replace
put rpl1 into card fld yes5
put "yes5" into spec1
put rpl1 into btn1
put rpl2 into card fld no5
put rpl2 into btn2
put "no5" into spec2
fill
end if
end if
if f3 = 100 then
put card fld yes6fld into x
put card fld no6fld into y
if x is empty and y is empty then
hide msg
exit mouseUp
else
add 1 to card fld "ans count"
if rem = "Con" then
put "Conclusion" into card fld label6
if the number of items in cd fld dccount = 1 then
put 0 into card fld dccount
else
delete last item of card fld dqcount
end if
else
put "Question" into card fld label6
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
end if
put x into tox
put y into toy
put f into qcc
put f into card fld ques6
put "no3" into fldloc
answer "There is a question after this question" with "OK"
answer "We must do a replacement question" with "OK"
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
replace
put rpl1 into card fld yes6
put "yes6" into spec1
put rpl1 into btn1
put rpl2 into card fld no6
put rpl2 into btn2
put "no6" into spec2
fill
end if
end if
if g3 = 100 then
put card fld yes7fld into x
put card fld no7fld into y
if x is empty and y is empty then
hide msg
exit mouseUp
else
add 1 to card fld "ans count"
if rem = "Con" then
put "Conclusion" into card fld label7
if the number of items in cd fld dccount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dccount
end if
else
put "Question" into card fld label7
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
end if
put x into tox
put y into toy
put g into qcc
put g into card fld ques7
put "yes3" into fldloc
answer "There is a question after this question" with "OK"
answer "We must do a replacement question" with "OK"
if the number of items in cd fld dqcount = 1 then
put 0 into card fld dqcount
else
delete last item of card fld dqcount
end if
replace
put rpl1 into card fld yes7
put "yes7" into spec1
put rpl1 into btn1
put rpl2 into card fld no7
put rpl2 into btn2
put "no7" into spec2
fill
end if
end if
set lockscreen to false
hide msg
end mouseUp
on fill
global qcc, rem, pp
put script of card fld "deleted" into pp
go to last card
domenu "new card"
choose text tool
set textAlign to left
set textSize to 24
set textStyle to bold, underline
click at 10,44
if rem = "Ques" then
type "Question:"
set the name of this card to "ques"&qcc
else
type "Conclusion"
set the name of this card to "con"&qcc
end if
choose button tool
domenu "new button"
set name of card button "new button" to "finished"
set rect of card button "finished" to 229,330,303,342
set script of card button "finished" to pp
choose browse tool
domenu "new field"
set the name of card fld "" to "funny"
set the textAlign of card fld "funny" to center
set the style of card fld funny to scrolling
choose browse tool
click at 246,131
end fill
on replace
global answertype, rpl1, rpl2
if answertype = "True-False" then
put "True" into rpl1
put "False" into rpl2
end if
if answertype = "A-B" then
put "A" into rpl1
put "B" into rpl2
end if
if answertype = "Yes-No" then
put "Yes" into rpl1
put "No" into rpl2
end if
end replace
-- part 2025 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=316 top=330 right=342 bottom=330
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: expertmenu
----- HyperTalk script -----
on mouseUp
ask "Enter the edit id number to delete"
if it is empty then exit mouseup
put it into x
put the number of card flds into tot
if x > tot then
answer "There is no id number "&x
exit mouseUp
end if
answer "Are you sure you want to delete item "&x with "OK" or "Wait"
if it is "Wait" then exit mouseUp
put the short name of card fld x into dl
delete first word of dl
delete first character of dl
delete last character of dl
put deletefile(dl) into returnthis
if returnthis = 0 then
answer "It is gone"
else
if returnthis < 0 then
OsErr returnthis
else
answer "Whoops, there was an error"
end if
end if
put the number of cards into y
if y > 1 then
put the short name of this card into nme
go to last card
put the number of card buttons into cb
put card fld cb into saved
put the script of card button cb into savedbtn
if cb = 1 then
domenu "delete card"
else
choose field tool
select card fld cb
domenu "clear field"
choose button tool
select button cb
domenu "clear button"
subtract 1 from bg fld hidder
end if
go to card nme
put saved into card fld x
set the script of card button x to savedbtn
choose fld tool
else
put the number of card buttons into cb
choose field tool
select card fld cb
domenu "clear field"
choose button tool
select button cb
domenu "clear button"
subtract 1 from bg fld hidder
choose browse tool
end if
choose browse tool
if y > 1 then
answer "It was replaced with the last menu item" with "OK"
end if
end mouseUp
-- part 2035 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=297 top=330 right=342 bottom=311
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: stackscr
----- HyperTalk script -----
on openStack
go to first card
put the number of cd buttons into x
if x = 0 then
put x into bg fld hidder
end if
end openStack
on closeStack
go to first card
put the number of cd buttons into x
if x = 0 then
put x into bg fld hidder
end if
end closeStack
-- part 2054 (field)
-- low flags: 80
-- high flags: 0000
-- rect: left=287 top=330 right=342 bottom=299
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: deletestack
----- HyperTalk script -----
on openStack
put the long name of this stack into temp
go to card "default"
put FontName() into rss
put rss into card fld fonttypes
go to card build
answer "Is this a new or old system" with "New" or "Old"
if it is "New" then
go to card "full"
put card fld "ques1" into x
if x is empty then
go to card build
answer "Click on Built Expert System to begin." with "OK"
show card fld help
else
answer "There is already a system here" with "OK"
end if
end if
if it is "Old" then
go to card "full"
put card fld "ques1" into x
if x is empty then
answer "There is no system to work on" with "OK"
go to card build
show card fld help
answer "Click on Built Expert System to begin." with "OK"
end if
end if
end openStack
on closeStack
domenu "compact stack"
end closeStack
-- part 2055 (field)
-- low flags: 81
-- high flags: 0007
-- rect: left=156 top=120 right=205 bottom=356
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: card id 4043
----- HyperTalk script -----
on mouseUp
hide me
end mouseUp
-- part 2059 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=410 top=317 right=339 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Home
----- HyperTalk script -----
on mouseUp
go home
end mouseUp
-- part 2120 (button)
-- low flags: 00
-- high flags: A004
-- rect: left=411 top=223 right=245 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Save System
----- HyperTalk script -----
on mouseUp
global savedscr, trag, exp, p, scr, pep, filename
answer "Are you sure your finished?" with "OK" or "Cancel"
if it is "Cancel" then exit mouseUp
put the script of this stack into savedscr
--set the script of this stack to ""
put the long name of this stack into p
put the long name of this stack into x
put the number of characters in x into y
put the script of card fld expertmenu into exp
put the script of card fld stackscr into scr
set the loc of msg box to 10,300
put "Looking for ExpertMenu Stack" into msg box
set cursor to watch
repeat y times
if character y of x = ":" then
exit repeat
else
delete character y of x
end if
subtract 1 from y
next repeat
end repeat
delete first word of x
delete first character of x
get Files(x)
put it into scope
put the number of words in scope into nm
repeat nm times
if word nm of scope = "ExpertMenu" then
put 1 into trag
exit repeat
else
put 2 into trag
end if
subtract 1 from nm
end repeat
put "WORKING" into msg
foundfun
if pep = 1 then
set the script of this stack to savedscr
exit mouseUp
end if
push card
put card fld "ans count" into y
put card fld "con count" into z
add y to z
go to card "ques1"
put the number of this card into rtt
set lockmessages to true
hide msg
answer "Choose a name for you Expert System" with "OK"
answer "Click new when finished" with "OK"
domenu "New Stack..."
put "WORKING" into msg
put the short name of this stack into testit
if testit = "HyperExpert 2.0" then
set the script of this stack to savedscr
go to card full
hide msg
exit mouseUp
end if
put the long name of this stack into zzz
set the script of this stack to "on openStack" &return&"go to card ques1" &return&"end openStack"
pop card
put the number of cards into xx
subtract rtt from xx
add 1 to xx
repeat xx times
set lockmessages to true
go to card rtt
domenu "copy card"
go to zzz
domenu "paste card"
go p
add 1 to rtt
end repeat
go p
put cd fld "problem" of card "full" into pmm
go to stack "ExpertMenu"
repeat until bg fld hidder Γëá 5
go to next card
end repeat
if bg fld "hidder" = 0 then
choose field tool
domenu "new field"
set the style of card fld "" to scrolling
set the rect of cd fld "" to 166,120,403,185
set the loc of cd fld "" to 284,71
put pmm into card fld ""
set the lockText of cd fld "" to true
set the name of cd fld "" to zzz
choose button tool
domenu "new button"
set the rect of cd button "new button" to 69,277,163,305
set the loc of cd button "new button" to 114,53
set the style of cd button "new button" to shadow
set the autoHilite of cd button "new button" to true
set the script of card button "new button" to "on mouseUp" &return&"go to "&zzz &return&"end mouseUp"
set the name of cd button "new button" to select
hide bg fld hidder
end if
if bg fld "hidder" = 1 then
choose field tool
domenu "new field"
set the style of card fld "" to scrolling
set the rect of cd fld "" to 166,120,403,185
set the loc of cd fld "" to 284,152
put pmm into card fld ""
set the lockText of cd fld "" to true
set the name of cd fld "" to zzz
choose button tool
domenu "new button"
set the rect of cd button "new button" to 69,277,163,305
set the loc of cd button "new button" to 114,134
set the style of cd button "new button" to shadow
set the autoHilite of cd button "new button" to true
set the script of card button "new button" to "on mouseUp" &return&"go to "&zzz &return&"end mouseUp"
set the name of cd button "new button" to select
hide bg fld hidder
end if
if bg fld "hidder" = 2 then
choose field tool
domenu "new field"
set the style of card fld "" to scrolling
set the rect of cd fld "" to 166,120,403,185
set the loc of cd fld "" to 284,231
put pmm into card fld ""
set the lockText of cd fld "" to true
set the name of cd fld "" to zzz
choose button tool
domenu "new button"
set the rect of cd button "new button" to 69,277,163,305
set the loc of cd button "new button" to 114,213
set the style of cd button "new button" to shadow
set the autoHilite of cd button "new button" to true
set the script of card button "new button" to "on mouseUp" &return&"go to "&zzz &return&"end mouseUp"
set the name of cd button "new button" to select
hide bg fld hidder
end if
if bg fld "hidder" = 3 then
choose field tool
domenu "new field"
set the style of card fld "" to scrolling
set the rect of cd fld "" to 166,120,403,185
set the loc of cd fld "" to 284,309
put pmm into card fld ""
set the lockText of cd fld "" to true
set the name of cd fld "" to zzz
choose button tool
domenu "new button"
set the rect of cd button "new button" to 69,277,163,305
set the loc of cd button "new button" to 114,291
set the style of cd button "new button" to shadow
set the autoHilite of cd button "new button" to true
set the script of card button "new button" to "on mouseUp" &return&"go to "&zzz &return&"end mouseUp"
set the name of cd button "new button" to select
hide bg fld hidder
end if
if bg fld "hidder" = 4 then
add 1 to bg fld hidder
domenu "new card"
choose field tool
domenu "new field"
set the name of cd fld "" to hidder
choose field tool
domenu "new field"
set the style of card fld "" to scrolling
set the rect of cd fld "" to 166,120,403,185
set the loc of cd fld "" to 284,71
put pmm into card fld ""
set the lockText of cd fld "" to true
set the name of cd fld "" to zzz
choose button tool
domenu "new button"
set the rect of cd button "new button" to 69,277,163,305
set the loc of cd button "new button" to 114,53
set the style of cd button "new button" to shadow
set the autoHilite of cd button "new button" to true
set the script of card button "new button" to "on mouseUp" &return&"go to "&zzz &return&"end mouseUp"
set the name of cd button "new button" to select
hide bg fld hidder
end if
if bg fld "hidder" is empty then
put 0 into bg fld "hidder"
else
add 1 to bg fld "hidder"
end if
go p
go to card "full"
hide msg
answer "Are you finished with this system" with "OK" or "CANCEL"
if it is "CANCEL" then
choose browse tool
set the script of this stack to savedscr
exit mouseUp
end if
answer "This will clean out the tree" with "CANCEL" or "OK"
if it is "CANCEL" then
choose browse tool
set the script of this stack to savedscr
exit mouseUp
end if
put "WORKING" into msg
set the script of this stack to savedscr
put empty into card fld "ans count"
put empty into card fld "con count"
put empty into card fld "cd count"
put empty into card fld yes1
put empty into card fld yes2
put empty into card fld yes3
put empty into card fld yes4
put empty into card fld yes5
put empty into card fld yes6
put empty into card fld yes7
put empty into card fld no1
put empty into card fld no2
put empty into card fld no3
put empty into card fld no4
put empty into card fld no5
put empty into card fld no6
put empty into card fld no7
put empty into card fld ques1
put empty into card fld ques2
put empty into card fld ques3
put empty into card fld ques4
put empty into card fld ques5
put empty into card fld ques6
put empty into card fld ques7
put empty into card fld label1
put empty into card fld label2
put empty into card fld label3
put empty into card fld label4
put empty into card fld label5
put empty into card fld label6
put empty into card fld label7
put empty into card fld no4fld
put empty into card fld no5fld
put empty into card fld no6fld
put empty into card fld no7fld
put empty into card fld yes4fld
put empty into card fld yes5fld
put empty into card fld yes6fld
put empty into card fld yes7fld
put empty into card fld dqcount
put empty into card fld dccount
put empty into cd fld problem
choose button tool
put 7 into y
put the number of card buttons into x
subtract 6 from x
repeat x times
select card button y
domenu "clear button"
end repeat
choose field tool
put 53 into y
put the number of card fields into x
subtract 52 from x
repeat x times
show card fld y
select card fld y
domenu "clear field"
end repeat
repeat with x = 1 to the number of cards
go to card ques1
put the short name of this card into x
if x = "Build" or x = "full" or x = "fulltoo" or x = "default" then
go to next card
else
domenu "delete card"
end if
end repeat
choose browse tool
go to card build
set lockmessages to false
hide msg
answer "Click on Build Expert System to start again"
end mouseUp
on foundfun
global trag, exp, savedscr, p, scr, fileName
hide msg box
if trag = 2 then
answer "Cant find stack ExpertMenu, must make new one"
set lockmessages to true
put newFileName("Click on the Save button","ExpertMenu") into fileName
newStack fileName
go stack fileName
put the short name of this stack into nam
put the long name of this stack into namer
delete first word of namer
delete first character of namer
delete last character of namer
if nam Γëá "ExpertMenu" then
answer "It must be named ExpertMenu (one word)" with "Silly me"
go p
put 1 into pep
exit foundfun
end if
domenu "Background"
choose button tool
domenu "new button"
set the rect of bg button "new button" to 444,294,504,331
set the loc of bg button "new button" to 474,312
set the style of bg btn "new button" to transparent
set the autoHilite of bg btn "new button" to true
set the showName of bg btn "new button" to false
set the icon of bg button "new button" to "Lge Next Arrow"
set the script of bg btn "new button" to "on mouseUp" &return&"go to next card" &return&"end mouseUp"
set the name of bg button "new button" to "Next"
domenu "New Button"
set the rect of bg button "New button" to 0,29,46,48
set the loc of bg button "New button" to 23,38
set the style of bg btn "New button" to shadow
set the script of bg btn "New button" to exp
set the name of bg btn "New button" to "Edit"
domenu "New Button"
set the rect of bg button "New button" to 0,29,46,48
set the loc of bg button "New button" to 21,331
set the style of bg btn "New button" to shadow
set the script of bg btn "New button" to "on mouseUp"&return& "domenu ""e&"quit hypercard""e&return&"end mouseUp"
set the name of bg btn "New button" to "Quit"
choose text tool
set the textAlign to left
set the textFont to Geneva
set the textSize to 12
set the textStyle to bold, shadow, outline
click at 10,13
type "HyperExpert Menu"
click at 412,49
set the textStyle to plain
set the textSize to 9
put 1 into lil
put 49 into plc
repeat 4 times
click at 412,plc
type "Edit ID Number: "&lil
add 1 to lil
add 81 to plc
end repeat
choose line tool
set the lineSize to 1
click at 0,20
drag from 0,20 to 511,20
set the lineSize to 2
drag from 0,23 to 511,23
choose field tool
domenu "New Field"
set the name of bg fld "" to "hidder"
put 0 into bg fld "hidder"
hide bg fld hidder
domenu "Background"
set the script of this stack to scr
go p
put the long name of this stack into thisname
delete first word of thisname
delete first character of thisname
delete last character of thisname
ResCopy thisname,namer,XFCN,345
else
exit foundfun
end if
end foundfun
-- part 2036 (field)
-- low flags: 81
-- high flags: 0007
-- rect: left=0 top=0 right=342 bottom=512
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: help
----- HyperTalk script -----
on mouseUp
hide me
end mouseUp
-- part contents for card part 328
----- text -----
This is six
-- part contents for card part 2036
----- text -----
HyperExpert Help - click on field to close it
***Load this stack onto your Hard disk or it will run very slow if you don't. Use HyperCard and not SuperCard. I have experienced some problems with this stack while using SuperCard.***
*************For those of you who can't wait to get started.************
Step 1 - First click on the button "Build Expert System"
Step 2 - It will ask you to define the problem to be worked on. This is the
problem that the end users are having. For Example - My car wont
start. Common questions or problems which get asked frequently
is one way to think of it.
Step 3 - Set Defaults. The HyperExpert Stack is designed to make setting
up your system as quick and easy as possible. The defaults are
so you can set your cards how you want them to look one time,
and then you wont have to do it again. Like all Yes-No questions.
Step 4 - After setting defaults you will have to click on the "Build Expert
System" button again to get started.
Step 5 - Now you start your questioning to come to a conclusion about
the problem. For example, if your problem is "My car wont start"
then a good first question would be "Did you check the gas tank".
You enter it in the proper field and click finished when done.
Step 6 - Now your at the tree portion of the stack. IF YOU CLICK ON THE
QUESTION 1 BOX YOU CAN SEE THE QUESTION YOU JUST TYPED. You
can also see the answers you have assigned for Question 1
(i.e Yes, No). Now click on the answer to the question you
would like to work with next. For example - your question was
"Did you check the gas tank" and if they
answer "No" you want to reach a conclusion at that point.
So click on the "No" answer box next to the box labeled
Question 1.
Step 7 - After clicking on the "No" box of Question 1 HyperExpert will ask
if you want a question or a conclusion. If you choose
conclusion, HyperExpert will ask you if you want the conclusion
to go to another question. For example you might have another
question you might want to ask even though you have reached
one conclusion already. Simply enter the question number here.
Step 8 - Now type your conclusion, like "You should check your gas tank"
click finished when done.
Step 9 - Now if your satisfied with all of your questions and conclusions
click "Save System" and HyperExpert will begin to look for
the stack "ExpertMenu". If this is the first time you have used
HyperExpert it will not find the stack and will ask you to make a
new one. When the new stack window comes up click save and
dont change the name of the stack. You also need to name your
question stacks. You may call these whatever you like. These
are the stacks that the ExpertMenu Stack references.
Step 10 - Your finished. Now give the ExpertMenu stack
and the question stacks you created to the people who need your
expertise. This may have sounded like a lot of steps but
after using this stack once or twice it becomes very intuitive.
Remember you can make the system as big as the memory and
disk space of your own Mac will allow.
You keep the HyperExpert Shell Stack for creating other systems.
**A word of advise, make sure all of your questions eventually
end with a conclusion, or your users may end up going down
a path to no conclusion.
**Note there is an edit button included on the ExpertMenu Stack.
This allows anyone to remove the files you have created. You
may want to remove this button, but it is up to you. It is
primarily for your use.
**Button Functions**
**Build Expert System**
Obviously is the first button you click on to get the process of building your system started.
**Clear Tree**
This button clears out the tree and the question cards that you have created. It is to be used if you have already saved the system or made some type of error that made it necessary to get rid of the entire system.
**Default Settings**
This button takes you to the area where you can decide what type of default settings you would like to have for your individual question cards
**Edit**
This button allows you to edit a question after you have created it. If the question is in the middle of the tree (i.e. there are other questions after it), then a replacement question must be created. If the question is at the end of the tree and there are no other questions after it, then it can be delete without having to replace the question.
There is an edit button on the ExpertMenu stack. It will delete the question stack of your choice. You may decide to remove this button before you give it to your end users. Its up to you.
**Set Answer Types**
This is a popup menu which gives you a choice of answer types to set as a default. For example -- Yes-No, True-False. After setting this default all of your answer types will be of this kind. Notice there is a Variable answer type for answers which don't fit into one of the given categories.
**Set Button Types**
This is a popup menu which gives you the standard Hypercard choices for button types.
**Set Font Size**
This is a popup menu which sets the font size of the field containing your answer or question.
**Set Font Types**
This is a list menu generated by the Dolist XCMD. It loads all the fonts you have available in your system and gives you the choice of which font you want to use for the field your question or conclusion is contained.
**Set Text Align**
This is a popup menu which allows you to choose a type of alignment (left, right, center) for the field which contains your question or conclusion.
**Save System**
This button saves your questions and conclusions to a separate stack. It will prompt you to name your stack and if you have not created an ExpertMenu stack you will be prompted to do that as well.
**Field Information**
**Deleted Conclusions**
This field shows the conclusion numbers you have deleted. HyperExpert re-uses these numbers until the field contains a zero and then it starts numbering from the last conclusion.
**Deleted Questions**
This field shows the question numbers you have deleted. HyperExpert re-uses these numbers until the field contains a zero and then it starts numbering from the last question.
**Name of Problem**
Obviously this is the name of the problem you defined in the beginning.
**Total Cards**
This is the total number of TREE cards. For instance if you fill up the tree card will all seven questions then add an eighth question, you would then be starting another tree card, so at that point you would have 2 tree cards or 2 total cards.
**Total Questions**
This is the total number of questions not counting conclusions.
**Total Conclusions**
This is the total number of conclusions not counting questions.